package org.activequant.dao.hibernate.config;

import org.activequant.dao.ISpecificationDao;
import org.apache.log4j.Logger;
import org.springframework.config.java.context.JavaConfigApplicationContext;
import org.springframework.context.ApplicationContext;

public class HibernateDaoTest {
	private final static Logger log = Logger.getLogger(HibernateDaoTest.class);
	
	public static void main(String ... av) throws Exception {
		ApplicationContext ctx = new JavaConfigApplicationContext(
				LocalSessionFactoryConfig.class,
				HibernateDaoConfig.class);
		
		ISpecificationDao dao = (ISpecificationDao) ctx.getBean("specificationDao");
		
		log.info("requesting all specifications");
		
		dao.findAll();
		
		log.info("all done");
	}
}
